package com.zh.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zh.domain.dto.attache.DeleteAttacheRequest;
import com.zh.domain.dto.attache.PageAttacheRequest;
import com.zh.domain.entity.Attaches;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zh.domain.vo.attache.AttachesVo;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author Administrator
 * @description 针对表【attaches】的数据库操作Service
 * @createDate 2025-03-04 15:51:34
 */
public interface AttachesService extends IService<Attaches> {

    Boolean add(Integer type, Integer typeId, String fileName, MultipartFile file);

    @Transactional(propagation = Propagation.REQUIRED)
    void sendMessageOrDynamic(boolean isSave,Integer type, Integer typeId, String fileName, String url);

    Boolean deleteAttache(DeleteAttacheRequest deleteAttacheRequest);

    Page<AttachesVo> pageAttache(PageAttacheRequest pageAttacheRequest);

}
